/*
* Copyright © Shanghai Awinic Technology Co., Ltd. 2020-2020. All rights reserved.
* Description: The header file of the crc related driver library.
* Date： 20201126
* Awinic_Version： aw_soc_driver_v1.0.0
*/
#include "compile_option.h"
#ifdef AW_86802

#ifndef __AW8680X_CRC_H
#define __AW8680X_CRC_H

/* Include ------------------------------------------------------------------*/
#include "aw8680x_def.h"

#define CRC_INIT_NUM		((AW_U32)0xffffffff)
#define CRC_CR_WORD			((AW_U32)0x00000003)
#define CRC_CR_LOAD_EN		((AW_U32)0x00000010)
#define CRC_CR_LOAD_DIS		(~CEC_CR_LOAD_EN)
#define CRC_CR_REV_IN_DIS	((AW_U32)0xffffff9f)
#define CRC_CR_REV_OUT_DIS	((AW_U32)0xffffff7f)
#define CRC_CR_REV_CRC_DIS	((AW_U32)0xfffffeff)
#define CRC_CR_OUT_XOR_DIS	((AW_U32)0xfffffdff)

void crc_init(void);
RET_STATUS_E crc_set_buf(AW_U32 crc_len, AW_U32 *p_crc_buf);
AW_U32 crc_get_num(void);

#endif
#endif
